package com.unireport.dbbean;

// Generated 2012-5-2 22:17:44 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * WebjobRpSql generated by hbm2java
 */
@Entity
@Table(name = "WEBJOB_RP_SQL", schema = "DATAMANAGER")
@SequenceGenerator(name="seq_webjob_sql_id", sequenceName="seq_webjob_sql_id",allocationSize=1)
public class WebjobRpSql implements java.io.Serializable {

	private int sqlId;
	private WebjobRpDef webjobRpDef;
	private String sqlType;
	private String fileName;
	private String sqlText;
	private Integer priority;
	private Short valFlag;
	private String remark;

	public WebjobRpSql() {
	}

	public WebjobRpSql(int sqlId, WebjobRpDef webjobRpDef, String sqlType) {
		this.sqlId = sqlId;
		this.webjobRpDef = webjobRpDef;
		this.sqlType = sqlType;
	}

	public WebjobRpSql(int sqlId, WebjobRpDef webjobRpDef, String sqlType,
			String fileName, String sqlText, Integer priority, Short valFlag,
			String remark) {
		this.sqlId = sqlId;
		this.webjobRpDef = webjobRpDef;
		this.sqlType = sqlType;
		this.fileName = fileName;
		this.sqlText = sqlText;
		this.priority = priority;
		this.valFlag = valFlag;
		this.remark = remark;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_webjob_sql_id")
	@Column(name = "SQL_ID", unique = true, nullable = false, precision = 8, scale = 0)
	public int getSqlId() {
		return this.sqlId;
	}

	public void setSqlId(int sqlId) {
		this.sqlId = sqlId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RP_ID", nullable = false)
	public WebjobRpDef getWebjobRpDef() {
		return this.webjobRpDef;
	}

	public void setWebjobRpDef(WebjobRpDef webjobRpDef) {
		this.webjobRpDef = webjobRpDef;
	}

	@Column(name = "SQL_TYPE", nullable = false, length = 10)
	public String getSqlType() {
		return this.sqlType;
	}

	public void setSqlType(String sqlType) {
		this.sqlType = sqlType;
	}

	@Column(name = "FILE_NAME", length = 256)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "SQL_TEXT", length = 0)
	public String getSqlText() {
		return this.sqlText;
	}

	public void setSqlText(String sqlText) {
		this.sqlText = sqlText;
	}

	@Column(name = "PRIORITY", precision = 8, scale = 0)
	public Integer getPriority() {
		return this.priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	@Column(name = "VAL_FLAG", precision = 4, scale = 0)
	public Short getValFlag() {
		return this.valFlag;
	}

	public void setValFlag(Short valFlag) {
		this.valFlag = valFlag;
	}

	@Column(name = "REMARK", length = 256)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
